<div id="network-supply-bar1" style="height: 100%">
    <form class="form-horizontal fv-form fv-form-bootstrap" id="form">
        <div class="form-group"  >
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">商品单价</label>
                <div class="col-sm-8" >
                    <input type="text" class="form-control" name="standard_name" id="prize" data-fv-field="standard_name" value="50" placeholder="请输入商品单价:0.95">
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">服务水平</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="standard_name" id="costomService" data-fv-field="standard_name" value="0.95" placeholder="请输入服务水平:0.95">
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">处理时间</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="standard_name" id="dealTime" data-fv-field="standard_name" value="3" placeholder="请输入处理时间:4">
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">持有成本</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="standard_name" id="holdCost" data-fv-field="standard_name" value="50" placeholder="请输入单位库存项目的持有成本:40">
                </div>
        </div>
        </div>
        <div class="form-group"  >
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">订购成本</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="standard_name" id="orderCost" data-fv-field="standard_name" value="40" placeholder="请输入订购成本:30">
                </div>
            </div>
            <div class="col-sm-3">
                <label class="col-sm-4 control-label">总月数</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="standard_name" id="months" data-fv-field="standard_name" value="6" placeholder="请输入总月数:6">
                </div>
            </div>
            <div class="col-sm-3">
                <div class="col-sm-6">
                    <button type="button" id="select" class="btn btn-success">查询</button>
                </div>
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        load1();
        $("#select").click(function(){
            load1();
        });
        $("select#prjId").change(function(){
            load1();
        });
    });
    function load1() {
        document.getElementById("loading").style.display="";
        var param = Form.getParams($("#form"));
        param.prize=$("#prize").val();
        param.holdCost=$("#holdCost").val();
        param.orderCost=$("#orderCost").val();
        param.costomService=$("#costomService").val();
        param.dealTime=$("#dealTime").val();
        param.months=$("#months").val();
        param.center=$("#prjId").val();
        $.ajax({
            url: "#springUrl('/network/supply/inventoryAfter/bar1')",
            data:param,
            type: "POST",
            success: function (text) {
                var d = JSON.parse(text);
                if (d.success && d.data) {
                    $("#safetyStock").text(d.data.safetyStock);
                    $("#orderPort").text(d.data.orderPort);
                    $("#turnoverInventory").text(d.data.turnoverInventory);
                    $("#maxInventory").text(d.data.maxInventory);
                    $("#eoq").text(d.data.eoq);
                    $("#moneyLevel").text(d.data.moneyLevel);
                    $("#avgInventory").text(d.data.avgInventory);
                    $("#toSecondaryCenter").text(d.data.toSecondaryCenter);
                    document.getElementById("loading").style.display="none";
                }
            }
        });
    }


</script>